package demo.thread;

import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

public class Demo5_Timer {
    /**
     * @param args
     * ��ʱ��
     * @throws InterruptedException
     */
    public static void main(String[] args) throws InterruptedException {
        Timer t = new Timer();
        t.schedule(new MyTimerTask(), new Date(114,9,15,10,54,20),3000);

        while(true) {
            System.out.println(new Date());
            Thread.sleep(1000);
        }
    }
}
class MyTimerTask extends TimerTask {
    @Override
    public void run() {
        System.out.println("�𴲱�Ӣ�ﵥ��");
    }

}
